/** 
 * Header de Piece.cxx
 *
 * @file Piece.h
 */

#if !defined Piece_h
#define Piece_h

#include <iostream>
#include <cstdlib>
#include <tr1/memory>

using namespace std;

/**
 * Declaration d'une classe modlisant une piece de jeu d'echec.
 */
class Piece 
{
protected:
    int m_x;
    int m_y;
    bool m_white;
    void init( int x, int y, bool white );
    virtual void DeplacerPiece(int x, int y)=0;

public:
    Piece();
    Piece(int x, int y, bool white);
    virtual ~Piece();
    void move( int x, int y );
    int x();
    int y();
    bool isWhite();
    bool isBlack();
    void setWhite(bool white);
    bool caseOccupee(Piece &P2);
    std::string toString();
}; 

typedef std::tr1::shared_ptr<Piece> PiecePtr;

#endif // !defined Piece_h
